//
//  NSString+Ext.m
//  翼安保
//
//  Created by duzhi on 2024/4/28.
//

#import "NSString+Ext.h"

@implementation NSString (Ext)

- (CGSize)sizeWithFont:(UIFont *)font maxWidth:(CGFloat)maxWidth {
    CGRect infoRect = [self boundingRectWithSize:CGSizeMake(maxWidth, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : font} context:nil];
    return infoRect.size;
}


@end
